package org.example.intelligent_education.service;

import org.example.intelligent_education.mapper.UserMapper;
import org.example.intelligent_education.model.CourseInfo;
import org.example.intelligent_education.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public UserInfo queryUserInfoByAccount(String account){
        return userMapper.queryUserInfoByAccount(account);
    }
    public Integer addUser(String account, String password,String name){
        return userMapper.addUser(account,password,name);
    }
    public CourseInfo recommendCourse(int uid){
        return userMapper.recommendCourse(uid);
    }
    public List<CourseInfo> getCoursesByUserId(int uid){
        return userMapper.getCoursesByUserId(uid);
    }
}
